/* 题一
 */
/* 
var name = 'global'
var o = {
  name: 'MYobject',
  getNameFunc: function() {
    return function() {
      return this.name
    }
  }
}

console.log((o.getNameFunc())()); //global  压根就没有产生闭包

 */

/* 
题二
*/
var name = 'global'
var o = {
  name: 'MYobject',
  getNameFunc: function() {
    var that = this;
    return function() {
      return that.name
    }
  }
}

console.log(o.getNameFunc()()); //MYobject